import { history } from 'umi';

let authorization = localStorage.getItem('authorization');

if (!authorization) {
  if (history.location.pathname === '/features/login_admin') {
    history.replace('/features/login_admin');
  } else {
    history.replace('/features/login');
  }
}
